<template>
  <div class="footer-container">
    <div class="left">
      <template v-for="item in CENTER_NAV_LIST" > 
        <span class="footer-nav-item" :key="item.id" @click="handleClick(item)">{{ item.name }}</span>
      </template>
    </div>
    <div class="right">
      <span>chenyu © 2023-2025</span>
    </div>
  </div>
</template>

<script>
import { CENTER_NAV_LIST } from '@/consts'
export default {
  name: "Footer",
  data() {
    return {
      CENTER_NAV_LIST: Object.freeze(CENTER_NAV_LIST),
    };
  },
  mounted() {},
  methods: {
    handleClick(item){
      if(this.$route.fullPath === item?.path) return;
      this.$router.push(item.path)
    }
  },
};
</script>


<style lang="scss" scoped>
.footer-container {
  width: 60%;
  margin-right: auto;
  margin-left: auto;
  height: 100px;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  border-top: 1px dotted #000;

 
 
  .left{
    height: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    .footer-nav-item{
      font-size: 14px;
      /* font-weight: 500; */
      color: #000;
      margin: 0 10px;
      cursor: pointer;
    }
  }
  .right{
    height: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }
  
}
</style>